home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 2 / AACD 2.iso / AACD / Magazine / GraphicsCards / StormMesa / src-glu / glu.s < prev    next >
Text File  |  1998-12-15  |  14KB  |  757 lines

  1.  
  2. ; Storm C Compiler
  3. ; Work2:Mesa3/Mesa-3.0/src-glu/glu.c
  4.     mc68030
  5.     mc68881
  6.     XREF    _glTranslated
  7.     XREF    _glMultMatrixf
  8.     XREF    _glMultMatrixd
  9.     XREF    _glFrustum
  10.     XREF    _glOrtho
  11.     XREF    _sqrt__r
  12.     XREF    _tan__r
  13.     XREF    _std__in
  14.     XREF    _std__out
  15.     XREF    _std__err
  16.  
  17.     SECTION "_gluLookAt:0",CODE
  18.  
  19.  
  20. ;void APIENTRY gluLookAt( GLdouble eyex, GLdouble eyey, GLdouble eyez
  21.     XDEF    _gluLookAt
  22. _gluLookAt
  23. L92    EQU    -$D0
  24.     link    a5,#L92
  25.     fmovem.x fp2/fp3/fp4/fp5/fp6/fp7,-(a7)
  26.     fmove.d    $20(a5),fp0
  27.     fmove.d    $30(a5),fp1
  28.     fmove.d    $18(a5),fp2
  29.     fmove.d    $10(a5),fp3
  30.     fmove.d    $8(a5),fp4
  31.     fmove.d    $28(a5),fp5
  32.     fmove.d    $48(a5),fp7
  33. L85
  34. ;   z[0] = eyex - centerx;
  35.     fmove.x    fp4,fp6
  36.     fsub.x    fp0,fp6
  37.     fmove.d    fp6,-$C8(a5)
  38. ;   z[1] = eyey - centery;
  39.     fmove.x    fp3,fp0
  40.     fsub.x    fp5,fp0
  41.     lea    -$C8(a5),a0
  42.     fmove.d    fp0,$8(a0)
  43. ;   z[2] = eyez - centerz;
  44.     fmove.x    fp2,fp0
  45.     fsub.x    fp1,fp0
  46.     lea    -$C8(a5),a0
  47.     fmove.d    fp0,$10(a0)
  48. ;   mag = sqrt( z[0]*z[0] + z[1]*z[1] + z[2]*z[2] );
  49.     fmove.d    -$C8(a5),fp0
  50.     fmul.d    -$C8(a5),fp0
  51.     lea    -$C8(a5),a0
  52.     fmove.d    $8(a0),fp1
  53.     lea    -$C8(a5),a0
  54.     fmul.d    $8(a0),fp1
  55.     fadd.x    fp1,fp0
  56.     lea    -$C8(a5),a0
  57.     fmove.d    $10(a0),fp1
  58.     lea    -$C8(a5),a0
  59.     fmul.d    $10(a0),fp1
  60.     fadd.x    fp1,fp0
  61.     fmove.d    fp0,-(a7)
  62.     jsr    _sqrt__r
  63.     addq.w    #$8,a7
  64. ;   if (mag) 
  65.     ftst.d    fp0
  66.     fbeq.b    L87
  67. L86
  68. ;      z[0] /= mag;
  69.     lea    -$C8(a5),a0
  70.     fmove.d    (a0),fp1
  71.     fdiv.x    fp0,fp1
  72.     fmove.d    fp1,(a0)
  73. ;      z[1] /= mag;
  74.     lea    -$C8(a5),a0
  75.     addq.w    #$8,a0
  76.     fmove.d    (a0),fp1
  77.     fdiv.x    fp0,fp1
  78.     fmove.d    fp1,(a0)
  79. ;      z[2] /= mag;
  80.     lea    -$C8(a5),a0
  81.     add.w    #$10,a0
  82.     fmove.d    (a0),fp1
  83.     fdiv.x    fp0,fp1
  84.     fmove.d    fp1,(a0)
  85. L87
  86. ;   y[0] = upx;
  87.     move.l    $38(a5),-$B0(a5)
  88.     move.l    $3C(a5),-$AC(a5)
  89. ;   y[1] = upy;
  90.     lea    -$B0(a5),a0
  91.     move.l    $40(a5),$8(a0)
  92.     move.l    $44(a5),$C(a0)
  93. ;   y[2] = upz;
  94.     lea    -$B0(a5),a0
  95.     fmove.d    fp7,$10(a0)
  96. ;   x[0] =  y[1]*z[2] - y[2]*z[1];
  97.     lea    -$B0(a5),a0
  98.     fmove.d    $8(a0),fp0
  99.     lea    -$C8(a5),a0
  100.     fmul.d    $10(a0),fp0
  101.     lea    -$B0(a5),a0
  102.     fmove.d    $10(a0),fp1
  103.     lea    -$C8(a5),a0
  104.     fmul.d    $8(a0),fp1
  105.     fsub.x    fp1,fp0
  106.     fmove.d    fp0,-$98(a5)
  107. ;   x[1] = -y[0]*z[2] + y[2]*z[0];
  108.     fmove.d    -$B0(a5),fp0
  109.     fneg.d    fp0
  110.     lea    -$C8(a5),a0
  111.     fmul.d    $10(a0),fp0
  112.     lea    -$B0(a5),a0
  113.     fmove.d    $10(a0),fp1
  114.     fmul.d    -$C8(a5),fp1
  115.     fadd.x    fp1,fp0
  116.     lea    -$98(a5),a0
  117.     fmove.d    fp0,$8(a0)
  118. ;   x[2] =  y[0]*z[1] - y[1]*z[0];
  119.     lea    -$C8(a5),a0
  120.     fmove.d    -$B0(a5),fp0
  121.     fmul.d    $8(a0),fp0
  122.     lea    -$B0(a5),a0
  123.     fmove.d    $8(a0),fp1
  124.     fmul.d    -$C8(a5),fp1
  125.     fsub.x    fp1,fp0
  126.     lea    -$98(a5),a0
  127.     fmove.d    fp0,$10(a0)
  128. ;   y[0] =  z[1]*x[2] - z[2]*x[1];
  129.     lea    -$C8(a5),a0
  130.     fmove.d    $8(a0),fp0
  131.     lea    -$98(a5),a0
  132.     fmul.d    $10(a0),fp0
  133.     lea    -$C8(a5),a0
  134.     fmove.d    $10(a0),fp1
  135.     lea    -$98(a5),a0
  136.     fmul.d    $8(a0),fp1
  137.     fsub.x    fp1,fp0
  138.     fmove.d    fp0,-$B0(a5)
  139. ;   y[1] = -z[0]*x[2] + z[2]*x[0];
  140.     fmove.d    -$C8(a5),fp0
  141.     fneg.d    fp0
  142.     lea    -$98(a5),a0
  143.     fmul.d    $10(a0),fp0
  144.     lea    -$C8(a5),a0
  145.     fmove.d    $10(a0),fp1
  146.     fmul.d    -$98(a5),fp1
  147.     fadd.x    fp1,fp0
  148.     lea    -$B0(a5),a0
  149.     fmove.d    fp0,$8(a0)
  150. ;   y[2] =  z[0]*x[1] - z[1]*x[0];
  151.     lea    -$98(a5),a0
  152.     fmove.d    -$C8(a5),fp0
  153.     fmul.d    $8(a0),fp0
  154.     lea    -$C8(a5),a0
  155.     fmove.d    $8(a0),fp1
  156.     fmul.d    -$98(a5),fp1
  157.     fsub.x    fp1,fp0
  158.     lea    -$B0(a5),a0
  159.     fmove.d    fp0,$10(a0)
  160. ;   mag = sqrt( x[0]*x[0] + x[1]*x[1] + x[2]*x[2] );
  161.     fmove.d    -$98(a5),fp0
  162.     fmul.d    -$98(a5),fp0
  163.     lea    -$98(a5),a0
  164.     fmove.d    $8(a0),fp1
  165.     lea    -$98(a5),a0
  166.     fmul.d    $8(a0),fp1
  167.     fadd.x    fp1,fp0
  168.     lea    -$98(a5),a0
  169.     fmove.d    $10(a0),fp1
  170.     lea    -$98(a5),a0
  171.     fmul.d    $10(a0),fp1
  172.     fadd.x    fp1,fp0
  173.     fmove.d    fp0,-(a7)
  174.     jsr    _sqrt__r
  175.     addq.w    #$8,a7
  176. ;   if (mag) 
  177.     ftst.d    fp0
  178.     fbeq.b    L89
  179. L88
  180. ;      x[0] /= mag;
  181.     lea    -$98(a5),a0
  182.     fmove.d    (a0),fp1
  183.     fdiv.x    fp0,fp1
  184.     fmove.d    fp1,(a0)
  185. ;      x[1] /= mag;
  186.     lea    -$98(a5),a0
  187.     addq.w    #$8,a0
  188.     fmove.d    (a0),fp1
  189.     fdiv.x    fp0,fp1
  190.     fmove.d    fp1,(a0)
  191. ;      x[2] /= mag;
  192.     lea    -$98(a5),a0
  193.     add.w    #$10,a0
  194.     fmove.d    (a0),fp1
  195.     fdiv.x    fp0,fp1
  196.     fmove.d    fp1,(a0)
  197. L89
  198. ;   mag = sqrt( y[0]*y[0] + y[1]*y[1] + y[2]*y[2] );
  199.     fmove.d    -$B0(a5),fp0
  200.     fmul.d    -$B0(a5),fp0
  201.     lea    -$B0(a5),a0
  202.     fmove.d    $8(a0),fp1
  203.     lea    -$B0(a5),a0
  204.     fmul.d    $8(a0),fp1
  205.     fadd.x    fp1,fp0
  206.     lea    -$B0(a5),a0
  207.     fmove.d    $10(a0),fp1
  208.     lea    -$B0(a5),a0
  209.     fmul.d    $10(a0),fp1
  210.     fadd.x    fp1,fp0
  211.     fmove.d    fp0,-(a7)
  212.     jsr    _sqrt__r
  213.     addq.w    #$8,a7
  214. ;   if (mag) 
  215.     ftst.d    fp0
  216.     fbeq.b    L91
  217. L90
  218. ;      y[0] /= mag;
  219.     lea    -$B0(a5),a0
  220.     fmove.d    (a0),fp1
  221.     fdiv.x    fp0,fp1
  222.     fmove.d    fp1,(a0)
  223. ;      y[1] /= mag;
  224.     lea    -$B0(a5),a0
  225.     addq.w    #$8,a0
  226.     fmove.d    (a0),fp1
  227.     fdiv.x    fp0,fp1
  228.     fmove.d    fp1,(a0)
  229. ;      y[2] /= mag;
  230.     lea    -$B0(a5),a0
  231.     add.w    #$10,a0
  232.     fmove.d    (a0),fp1
  233.     fdiv.x    fp0,fp1
  234.     fmove.d    fp1,(a0)
  235. L91
  236. ;   M(0,0) = x[0];
  237.     move.l    -$98(a5),-$80(a5)
  238.     move.l    -$94(a5),-$7C(a5)
  239. ;  M(0,1) = x[1];
  240.     lea    -$98(a5),a0
  241.     fmove.d    $8(a0),fp0
  242.     lea    -$80(a5),a0
  243.     fmove.d    fp0,$20(a0)
  244. ;  M(0,2) = x[2];
  245.     lea    -$98(a5),a0
  246.     fmove.d    $10(a0),fp0
  247.     lea    -$80(a5),a0
  248.     fmove.d    fp0,$40(a0)
  249. ;  M(0,3) = 0.0;
  250.     lea    -$80(a5),a0
  251.     clr.l    $60(a0)
  252.     clr.l    $64(a0)
  253. ;   M(1,0) = y[0];
  254.     lea    -$80(a5),a0
  255.     move.l    -$B0(a5),$8(a0)
  256.     move.l    -$AC(a5),$C(a0)
  257. ;  M(1,1) = y[1];
  258.     lea    -$B0(a5),a0
  259.     fmove.d    $8(a0),fp0
  260.     lea    -$80(a5),a0
  261.     fmove.d    fp0,$28(a0)
  262. ;  M(1,2) = y[2];
  263.     lea    -$B0(a5),a0
  264.     fmove.d    $10(a0),fp0
  265.     lea    -$80(a5),a0
  266.     fmove.d    fp0,$48(a0)
  267. ;  M(1,3) = 0.0;
  268.     lea    -$80(a5),a0
  269.     clr.l    $68(a0)
  270.     clr.l    $6C(a0)
  271. ;   M(2,0) = z[0];
  272.     lea    -$80(a5),a0
  273.     move.l    -$C8(a5),$10(a0)
  274.     move.l    -$C4(a5),$14(a0)
  275. ;  M(2,1) = z[1];
  276.     lea    -$C8(a5),a0
  277.     fmove.d    $8(a0),fp0
  278.     lea    -$80(a5),a0
  279.     fmove.d    fp0,$30(a0)
  280. ;  M(2,2) = z[2];
  281.     lea    -$C8(a5),a0
  282.     fmove.d    $10(a0),fp0
  283.     lea    -$80(a5),a0
  284.     fmove.d    fp0,$50(a0)
  285. ;  M(2,3) = 0.0;
  286.     lea    -$80(a5),a0
  287.     clr.l    $70(a0)
  288.     clr.l    $74(a0)
  289. ;   M(3,0) = 0.0;
  290.     lea    -$80(a5),a0
  291.     clr.l    $18(a0)
  292.     clr.l    $1C(a0)
  293. ;   M(3,1) = 0.0;
  294.     lea    -$80(a5),a0
  295.     clr.l    $38(a0)
  296.     clr.l    $3C(a0)
  297. ;   M(3,2) = 0.0;
  298.     lea    -$80(a5),a0
  299.     clr.l    $58(a0)
  300.     clr.l    $5C(a0)
  301. ;   M(3,3) = 1.0;
  302.     lea    -$80(a5),a0
  303.     move.l    #$3FF00000,$78(a0)
  304.     clr.l    $7C(a0)
  305. ;   glMultMatrixd( m );
  306.     pea    -$80(a5)
  307.     jsr    _glMultMatrixd
  308.     addq.w    #4,a7
  309. ;   glTranslated( -eyex, -eyey, -eyez );
  310.     fneg.d    fp2
  311.     fmove.d    fp2,-(a7)
  312.     fneg.d    fp3
  313.     fmove.d    fp3,-(a7)
  314.     fneg.d    fp4
  315.     fmove.d    fp4,-(a7)
  316.     jsr    _glTranslated
  317.     add.w    #$18,a7
  318.     fmovem.x (a7)+,fp2/fp3/fp4/fp5/fp6/fp7
  319.     unlk    a5
  320.     rts
  321.  
  322. L82
  323.     dc.b    0
  324. L83
  325.     dc.b    '1.1 Mesa 3.0',0
  326. L74
  327.     dc.b    'UNUSED',0
  328. L51
  329.     dc.b    'bgncurve() must precede endcurve()',0
  330. L59
  331.     dc.b    'bgnsurface() must precede bgntrim()',0
  332. L57
  333.     dc.b    'bgnsurface() must precede endsurface()',0
  334. L61
  335.     dc.b    'bgntrim() must precede endtrim()',0
  336. L63
  337.     dc.b    'bgntrim() must precede pwlcurve()',0
  338. L53
  339.     dc.b    'can't draw pwlcurves',0
  340. L41
  341.     dc.b    'coincident vertices',0
  342. L42
  343.     dc.b    'colinear vertices',0
  344. L58
  345.     dc.b    'curve of improper type passed as trim curve',0
  346. L48
  347.     dc.b    'decreasing knot sequence knot',0
  348. L81
  349.     dc.b    'duplicate point on pwlcurve',0
  350. L50
  351.     dc.b    'endcurve() must follow bgncurve()',0
  352. L71
  353.     dc.b    'endsurface() must follow bgnsurface()',0
  354. L60
  355.     dc.b    'endtrim() must follow bgntrim()',0
  356. L56
  357.     dc.b    'endtrim() must precede endsurface()',0
  358. L66
  359.     dc.b    'improper usage of trim data type',0
  360. L43
  361.     dc.b    'intersecting edges',0
  362. L73
  363.     dc.b    'intersecting trim curves',0
  364. L62
  365.     dc.b    'invalid or missing trim curve',0
  366. L70
  367.     dc.b    'invalid property',0
  368. L49
  369.     dc.b    'knot multiplicity greater than order of spline',0
  370. L38
  371.     dc.b    'misoriented contour',0
  372. L40
  373.     dc.b    'misoriented or self-intersecting loops',0
  374. L72
  375.     dc.b    'misoriented trim curves',0
  376. L54
  377.     dc.b    'missing bgncurve()',0
  378. L55
  379.     dc.b    'missing bgnsurface()',0
  380. L37
  381.     dc.b    'missing gluBeginPolygon',0
  382. L36
  383.     dc.b    'missing gluEndPolygon',0
  384. L52
  385.     dc.b    'missing or extra geometric data',0
  386. L78
  387.     dc.b    'negative byte-stride encounteed',0
  388. L77
  389.     dc.b    'negative vertex count encountered',0
  390. L44
  391.     dc.b    'not coplanar contours',0
  392. L80
  393.     dc.b    'null control array or knot vector',0
  394. L68
  395.     dc.b    'nurbscurve and pwlcurve mixed',0
  396. L67
  397.     dc.b    'nurbscurve referenced twice',0
  398. L69
  399.     dc.b    'nurbssurface referenced twice',0
  400. L65
  401.     dc.b    'pwlcurve and nurbscurve mixed',0
  402. L64
  403.     dc.b    'pwlcurve referenced twice',0
  404. L45
  405.     dc.b    'spline order un-supported',0
  406. L46
  407.     dc.b    'too few knots',0
  408. L75
  409.     dc.b    'unconnected trim curves',0
  410. L76
  411.     dc.b    'unknown knot error',0
  412. L79
  413.     dc.b    'unknown type descriptor',0
  414. L47
  415.     dc.b    'valid knot range is empty',0
  416. L39
  417.     dc.b    'vertex/edge intersection',0
  418.  
  419.     SECTION "_gluOrtho2D:0",CODE
  420.  
  421.     rts
  422.  
  423. ;void APIENTRY gluOrtho2D( GLdouble left, GLdouble right,
  424.     XDEF    _gluOrtho2D
  425. _gluOrtho2D
  426.     fmovem.x fp2/fp3,-(a7)
  427.     fmove.d    $1C(a7),fp0
  428.     fmove.d    $24(a7),fp1
  429.     fmove.d    $2C(a7),fp2
  430.     fmove.d    $34(a7),fp3
  431. L93
  432. ;   glOrtho( left, right, bottom, top, -1.0, 1.0 );
  433.     clr.l    -(a7)
  434.     move.l    #$3FF00000,-(a7)
  435.     clr.l    -(a7)
  436.     move.l    #$BFF00000,-(a7)
  437.     fmove.d    fp3,-(a7)
  438.     fmove.d    fp2,-(a7)
  439.     fmove.d    fp1,-(a7)
  440.     fmove.d    fp0,-(a7)
  441.     jsr    _glOrtho
  442.     add.w    #$30,a7
  443.     fmovem.x (a7)+,fp2/fp3
  444.     rts
  445.  
  446.     SECTION "_gluPerspective:0",CODE
  447.  
  448.  
  449. ;void APIENTRY gluPerspective( GLdouble fovy, GLdouble aspect,
  450.     XDEF    _gluPerspective
  451. _gluPerspective
  452.     fmovem.x fp2/fp3/fp4/fp5/fp6,-(a7)
  453.     fmove.d    $40(a7),fp0
  454.     fmove.d    $48(a7),fp2
  455.     fmove.d    $50(a7),fp4
  456.     fmove.d    $58(a7),fp5
  457. L94
  458. ;   ymax = zNear * tan( fovy * M_PI / 360.0 );
  459.     fmul.d    #$.400921FB.544486DA,fp0
  460.     fdiv.d    #$.40768000.00000000,fp0
  461.     fmove.d    fp0,-(a7)
  462.     jsr    _tan__r
  463.     addq.w    #$8,a7
  464.     fmul.x    fp4,fp0
  465. ;   ymin = -ymax;
  466.     fmove.x    fp0,fp1
  467.     fneg.d    fp1
  468. ;   xmin = ymin * aspect;
  469.     fmove.x    fp1,fp3
  470.     fmul.x    fp2,fp3
  471. ;   xmax = ymax * aspect;
  472.     fmul.x    fp0,fp2
  473. ;   glFrustum( xmin, xmax, ymin, ymax, zNear, zFar );
  474.     fmove.d    fp5,-(a7)
  475.     fmove.d    fp4,-(a7)
  476.     fmove.d    fp0,-(a7)
  477.     fmove.d    fp1,-(a7)
  478.     fmove.d    fp2,-(a7)
  479.     fmove.d    fp3,-(a7)
  480.     jsr    _glFrustum
  481.     add.w    #$30,a7
  482.     fmovem.x (a7)+,fp2/fp3/fp4/fp5/fp6
  483.     rts
  484.  
  485.     SECTION "_gluPickMatrix:0",CODE
  486.  
  487.  
  488. ;void APIENTRY gluPickMatrix( GLdouble x, GLdouble y,
  489.     XDEF    _gluPickMatrix
  490. _gluPickMatrix
  491. L96    EQU    -$50
  492.     link    a5,#L96
  493.     fmovem.x fp2/fp3/fp4/fp5/fp6/fp7,-(a7)
  494.     move.l    $28(a5),a0
  495.     fmove.d    $18(a5),fp2
  496.     fmove.d    $20(a5),fp4
  497.     fmove.d    $8(a5),fp6
  498.     fmove.d    $10(a5),fp7
  499. L95
  500. ;   sx = viewport[2] / width;
  501.     fmove.l    $8(a0),fp0
  502.     fdiv.x    fp2,fp0
  503.     fmove.x    fp0,fp5
  504. ;   sy = viewport[3] / height;
  505.     fmove.l    $C(a0),fp0
  506.     fdiv.x    fp4,fp0
  507.     fmove.x    fp0,fp3
  508. ;   tx = (viewport[2] + 2.0 * (viewport[0] - x)) / width;
  509.     fmove.l    $8(a0),fp0
  510.     fmove.l    (a0),fp1
  511.     fsub.x    fp6,fp1
  512.     fmul.d    #$.40000000.00000000,fp1
  513.     fadd.x    fp1,fp0
  514.     fdiv.x    fp2,fp0
  515.     fmove.x    fp0,fp2
  516. ;   ty = (viewport[3] + 2.0 * (viewport[1] - y)) / height;
  517.     fmove.l    $C(a0),fp0
  518.     fmove.l    4(a0),fp1
  519.     fsub.x    fp7,fp1
  520.     fmul.d    #$.40000000.00000000,fp1
  521.     fadd.x    fp1,fp0
  522.     fdiv.x    fp4,fp0
  523. ;   M(0,0) = sx;
  524.     fmove.s    fp5,-$40(a5)
  525. ;   M(0,1) = 0.0;
  526.     lea    -$40(a5),a0
  527.     clr.l    $10(a0)
  528. ;  M(0,2) = 0.0;
  529.     lea    -$40(a5),a0
  530.     clr.l    $20(a0)
  531. ;  M(0,3) = tx;
  532.     lea    -$40(a5),a0
  533.     fmove.s    fp2,$30(a0)
  534. ;   M(1,0) = 0.0;
  535.     lea    -$40(a5),a0
  536.     clr.l    4(a0)
  537. ;  M(1,1) = sy;
  538.     lea    -$40(a5),a0
  539.     fmove.s    fp3,$14(a0)
  540. ;   M(1,2) = 0.0;
  541.     lea    -$40(a5),a0
  542.     clr.l    $24(a0)
  543. ;  M(1,3) = ty;
  544.     lea    -$40(a5),a0
  545.     fmove.s    fp0,$34(a0)
  546. ;   M(2,0) = 0.0;
  547.     lea    -$40(a5),a0
  548.     clr.l    $8(a0)
  549. ;  M(2,1) = 0.0;
  550.     lea    -$40(a5),a0
  551.     clr.l    $18(a0)
  552. ;  M(2,2) = 1.0;
  553.     lea    -$40(a5),a0
  554.     move.l    #$3F800000,$28(a0)
  555. ;  M(2,3) = 0.0;
  556.     lea    -$40(a5),a0
  557.     clr.l    $38(a0)
  558. ;   M(3,0) = 0.0;
  559.     lea    -$40(a5),a0
  560.     clr.l    $C(a0)
  561. ;  M(3,1) = 0.0;
  562.     lea    -$40(a5),a0
  563.     clr.l    $1C(a0)
  564. ;  M(3,2) = 0.0;
  565.     lea    -$40(a5),a0
  566.     clr.l    $2C(a0)
  567. ;  M(3,3) = 1.0;
  568.     lea    -$40(a5),a0
  569.     move.l    #$3F800000,$3C(a0)
  570. ;   glMultMatrixf( m );
  571.     pea    -$40(a5)
  572.     jsr    _glMultMatrixf
  573.     addq.w    #4,a7
  574.     fmovem.x (a7)+,fp2/fp3/fp4/fp5/fp6/fp7
  575.     unlk    a5
  576.     rts
  577.  
  578.     SECTION "_gluErrorString:0",CODE
  579.  
  580.  
  581. ;const GLubyte* APIENTRY gluErrorString( GLenum errorCode )
  582.     XDEF    _gluErrorString
  583. _gluErrorString
  584.     move.l    4(a7),d0
  585. L105
  586. ;   if (errorCode==GL_NO_ERROR) 
  587.     tst.l    d0
  588.     bne.b    L107
  589. L106
  590.     move.l    #L97,d0
  591.     rts
  592. L107
  593. ;   else if (errorCode==GL_INVALID_VALUE) 
  594.     cmp.l    #$501,d0
  595.     bne.b    L109
  596. L108
  597.     move.l    #L98,d0
  598.     rts
  599. L109
  600. ;   else if (errorCode==GL_INVALID_ENUM) 
  601.     cmp.l    #$500,d0
  602.     bne.b    L111
  603. L110
  604.     move.l    #L99,d0
  605.     rts
  606. L111
  607. ;   else if (errorCode==GL_INVALID_OPERATION) 
  608.     cmp.l    #$502,d0
  609.     bne.b    L113
  610. L112
  611.     move.l    #L100,d0
  612.     rts
  613. L113
  614. ;   else if (errorCode==GL_STACK_OVERFLOW) 
  615.     cmp.l    #$503,d0
  616.     bne.b    L115
  617. L114
  618.     move.l    #L101,d0
  619.     rts
  620. L115
  621. ;   else if (errorCode==GL_STACK_UNDERFLOW) 
  622.     cmp.l    #$504,d0
  623.     bne.b    L117
  624. L116
  625.     move.l    #L102,d0
  626.     rts
  627. L117
  628. ;   else if (errorCode==GL_OUT_OF_MEMORY) 
  629.     cmp.l    #$505,d0
  630.     bne.b    L119
  631. L118
  632.     move.l    #L103,d0
  633.     rts
  634. L119
  635. ;   else if (errorCode==GLU_NO_ERROR) 
  636.     tst.l    d0
  637.     bne.b    L121
  638. L120
  639.     move.l    #L97,d0
  640.     rts
  641. L121
  642. ;   else if (errorCode==GLU_INVALID_ENUM) 
  643.     cmp.l    #$18A24,d0
  644.     bne.b    L123
  645. L122
  646.     move.l    #L99,d0
  647.     rts
  648. L123
  649. ;   else if (errorCode==GLU_INVALID_VALUE) 
  650.     cmp.l    #$18A25,d0
  651.     bne.b    L125
  652. L124
  653.     move.l    #L98,d0
  654.     rts
  655. L125
  656. ;   else if (errorCode==GLU_OUT_OF_MEMORY) 
  657.     cmp.l    #$18A26,d0
  658.     bne.b    L127
  659. L126
  660.     move.l    #L103,d0
  661.     rts
  662. L127
  663. ;   else if (errorCode==GLU_INCOMPATIBLE_GL_VERSION) 
  664.     cmp.l    #$18A27,d0
  665.     bne.b    L129
  666. L128
  667.     move.l    #L104,d0
  668.     rts
  669. L129
  670. ;   else if (errorCode>=GLU_TESS_ERROR1 && errorCode<=GLU_TES
  671.     cmp.l    #$18737,d0
  672.     blt.b    L132
  673. L130
  674.     cmp.l    #$1873F,d0
  675.     bgt.b    L132
  676. L131
  677.     lea    _tess_error___gluErrorString(a6),a0
  678.     sub.l    #$61CDC,a0
  679.     move.l    0(a0,d0.l*4),d0
  680.     rts
  681. L132
  682. ;   else if (errorCode>=GLU_NURBS_ERROR1 && errorCode<=GLU_NU
  683.     cmp.l    #$1879B,d0
  684.     blt.b    L135
  685. L133
  686.     cmp.l    #$187BF,d0
  687.     bgt.b    L135
  688. L134
  689.     lea    _nurbs_error___gluErrorString(a6),a0
  690.     sub.l    #$61E6C,a0
  691.     move.l    0(a0,d0.l*4),d0
  692.     rts
  693. L135
  694.     moveq    #0,d0
  695.     rts
  696.  
  697. L104
  698.     dc.b    'incompatible GL version',0
  699. L99
  700.     dc.b    'invalid enum',0
  701. L100
  702.     dc.b    'invalid operation',0
  703. L98
  704.     dc.b    'invalid value',0
  705. L97
  706.     dc.b    'no error',0
  707. L103
  708.     dc.b    'out of memory',0
  709. L101
  710.     dc.b    'stack overflow',0
  711. L102
  712.     dc.b    'stack underflow',0
  713.  
  714.     SECTION "_gluErrorString:1",DATA
  715.  
  716. _tess_error___gluErrorString
  717.     dc.l    L36,L37,L38,L39,L40,L41,L42,L43,L44
  718. _nurbs_error___gluErrorString
  719.     dc.l    L45,L46,L47,L48,L49,L50,L51,L52,L53,L54,L55
  720.     dc.l    L56,L57,L58,L59,L60,L61,L62,L63,L64,L65,L66
  721.     dc.l    L67,L68,L69,L70,L71,L72,L73,L74,L75,L76,L77
  722.     dc.l    L78,L79,L80,L81
  723.  
  724.     SECTION "_gluGetString:0",CODE
  725.  
  726.  
  727. ;const GLubyte* APIENTRY gluGetString( GLenum name )
  728.     XDEF    _gluGetString
  729. _gluGetString
  730.     move.l    4(a7),d0
  731. L136
  732. ;   switch (name)
  733.     cmp.l    #$189C0,d0
  734.     beq.b    L138
  735.     cmp.l    #$189C1,d0
  736.     beq.b    L137
  737.     bra.b    L139
  738. ;      
  739. L137
  740.     move.l    _extensions___gluGetString(a6),d0
  741.     rts
  742. L138
  743.     move.l    _version___gluGetString(a6),d0
  744.     rts
  745. L139
  746.     moveq    #0,d0
  747.     rts
  748.  
  749.     SECTION "_gluGetString:1",DATA
  750.  
  751. _extensions___gluGetString
  752.     dc.l    L82
  753. _version___gluGetString
  754.     dc.l    L83
  755.  
  756.     END
  757.